/**
 * Created by tom on 2017/5/7.
 */

var mongoose = require('mongoose')
var db = require('../../server/db')

var modelName = 'result'

var schema = new mongoose.Schema({
    topicId: {type: mongoose.Schema.ObjectId},
    handler: {
        id: {type: mongoose.Schema.ObjectId},
        name: {type: String}
    },
    title: {type: String, request: true},
    desc: {type: String ,default: ''},
    type: {type: Number ,default: 0},  // 类型  0 it知识  1 生活常识  2 调查问卷
    daType: {type: Number ,default: 0},  // 答题类型   0 为填空  1 为判断
    autor: {type: String ,default: ''},
    content: [
        {
            wen: {type: String ,default: ''},
            da: {type: String ,default: ''}
        }
    ]
}, {timestamps: true})

var model = db.model(modelName, schema)


module.exports = model